/******************************************************************************
* Copyright Authors DustinKsi@ Youibot 2019. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/

#pragma once

#include <fstream>

#include "venus/common/config_file_resolver.h"
#include "venus/common/dustin_log.h"
#include "venus/common/lua_param_dictionary.h"

#include "venus/mapping/proto/mapping_options.pb.h"
#include "venus/sensor/proto/sensor.pb.h"
#include "venus/sensor/feature_map_io.h"


namespace VEnus {
namespace Mapping {

class AbstractMapping {
 public:
  AbstractMapping(/* args */) {
    
  }
  virtual ~AbstractMapping() = default;

  virtual bool Init() = 0;
  virtual bool InsertFeatureList(VEnus::Sensor::Feature2DList &feature_list,
                                 VEnus::Sensor::AdjacencyList &graph,
                                 VEnus::Sensor::RobotPose &pose) = 0;

  virtual bool SetInitialPose(VEnus::Sensor::RobotPose &pose) = 0;

  void SetMappingOptions(const MappingOptions &options);

  void SaveMap();
  bool LoadExistMapFile();

  MappingOptions _options;
  VEnus::Sensor::AdjacencyList current_graph;
};


}  // namespace Mapping

}  // namespace VEnus